'use strict';

var express = require('express');
var controller = require('./tags.controller');
var auth = require('../../auth/auth.service');

var router = express.Router();

router.post('/addTagCat',auth.hasRole('admin'),controller.addTagCat);
router.get('/getTagCatList',controller.getTagCatList);
router.put('/updateTagCat/:id', auth.hasRole('admin'), controller.updateTagCat);
router.delete('delTagCat/:id', auth.hasRole('admin'), controller.delTagCat);
router.get('/getTagList', controller.getTagList);
router.post('/addTag', auth.hasRole('admin'), controller.addTag);
router.delete('/delTag/:id', auth.hasRole('admin'), controller.deleteTag);
router.put('/updateTag/:id', auth.hasRole('admin'), controller.updateTag);
//前台数据
router.get('/getFrontTagList',controller.getFrontTagList);
module.exports = router;